package org.entity;

import java.util.Date;

public class GameScore implements Comparable<GameScore>{

	private Integer gscoreid;
	private int gscore;
	private String gameresult;
	private Integer playerid;
	private Integer gameid;
	private int gameroundnum;
	private Date gametime;
	
	
	
	public String getGameresult() {
		return gameresult;
	}
	public void setGameresult(String gameresult) {
		this.gameresult = gameresult;
	}
	public Integer getGscoreid() {
		return gscoreid;
	}
	public void setGscoreid(Integer gscoreid) {
		this.gscoreid = gscoreid;
	}
	public int getGscore() {
		return gscore;
	}
	public void setGscore(int gscore) {
		this.gscore = gscore;
	}
	public Integer getPlayerid() {
		return playerid;
	}
	public void setPlayerid(Integer playerid) {
		this.playerid = playerid;
	}
	public Integer getGameid() {
		return gameid;
	}
	public void setGameid(Integer gameid) {
		this.gameid = gameid;
	}
	public int getGameroundnum() {
		return gameroundnum;
	}
	public void setGameroundnum(int gameroundnum) {
		this.gameroundnum = gameroundnum;
	}
	public Date getGametime() {
		return gametime;
	}
	public void setGametime(Date gametime) {
		this.gametime = gametime;
	}
	@Override
	public String toString() {
		return "GameScore [gscoreid=" + gscoreid + ", gscore=" + gscore
				+ ", playerid=" + playerid + ", gameid=" + gameid
				+ ", gameroundnum=" + gameroundnum + ", gametime=" + gametime
				+ "]";
	}
	@Override
	public int compareTo(GameScore gScore) {
		// 乘以 -1 是为了倒叙排列 
		return -1 * Integer.valueOf(this.getGscore()).compareTo(Integer.valueOf(gScore.getGscore()));
	}
}
